Skip to content

Conversation

@github-classroom
Copy link

@github-classroom github-classroom bot commented Oct 5, 2025

👋! GitHub Classroom created this pull request as a place for your teacher to leave feedback on your work. It will update automatically. Don’t close or merge this pull request, unless you’re instructed to do so by your teacher.
In this pull request, your teacher can leave comments and feedback on your code. Click the Subscribe button to be notified if that happens.
Click the Files changed or Commits tab to see all of the changes pushed to the default branch since the assignment started. Your teacher can see this too.

Notes for teachers

Use this PR to leave feedback. Here are some tips:

  • Click the Files changed tab to see all of the changes pushed to the default branch since the assignment started. To leave comments on specific lines of code, put your cursor over a line of code and click the blue + (plus sign). To learn more about comments, read “Commenting on a pull request”.
  • Click the Commits tab to see the commits pushed to the default branch. Click a commit to see specific changes.
  • If you turned on autograding, then click the Checks tab to see the results.
  • This page is an overview. It shows commits, line comments, and general comments. You can leave a general comment below.
    For more information about this pull request, read “Leaving assignment feedback in GitHub”.

Subscribed: @DennSel

@github-actions
Copy link

github-actions bot commented Oct 5, 2025

🤖 AI Feedback

🕒 Posted on 2025-10-23T09:37:20.298Z

Overall Feedback

The submission passes all BasicTest and EdgeCaseTest test cases. The implementation is functional and produces correct outputs for the warehouse analysis tasks. Great work cleaning up after the digital disaster!

What's Working Well

  • Correct Algorithm Implementation: Methods like findProductsInPriceRange, searchProductsByName, and optimizeShippingGroups correctly process collections and respect constraints.
  • Population Statistics Compliance: findPriceOutliers uses IQR-based outlier detection with aggressive range calculation, meeting test expectations.
  • Efficient Collections Handling: calculateWeightedAveragePriceByCategory correctly handles both weighted and non-weighted products with proper rounding.

Areas for Improvement

  • Documentation Clarity
    Issue: Method comment for findPriceOutliers states it uses "population standard deviation" but implements IQR-based detection with outlier multiplier.
    Suggestion: Update comments to accurately describe the IQR algorithm used. Test expects 2.0 multiplier to flag both extreme values (price=500 and price=0.01).
    Reference: src/main/java/com/example/WarehouseAnalyzer.java line ~340

Summary

The solution is functionally correct but requires better algorithm documentation. Remember: Javadoc should precisely reflect implementation details to avoid confusion.


Previous Feedback

🕒 Posted on 2025-10-20T12:18:41.428Z

Overall Feedback

The implementation is comprehensive and mostly correct. TheWarehouseAnalyzer successfully passes most advanced tests, demonstrating a solid understanding of the requirements.

Areas for Improvement

  • Issue: findProductsExpiringWithinDays has incorrect date logic (line 72).
    Suggestion: Fix boundary check to include items expiring TODAY or within N days, excluding already expired items. Change !exp.isAfter(end) to exp.isBefore(end.plusDays(1)) to include the entire end date window.

  • Issue: optimizeShippingGroups does not calculate or return shipping costs (line 132).
    Suggestion: For each ShippingGroup, compute calculateShippingCost() sum directly instead of relying on pre-calculated values. Update group initialization:

    this.totalShippingCost = bin.stream()
        .map(Shippable::calculateShippingCost)
        .reduce(BigDecimal.ZERO, BigDecimal::add);
  • Issue: calculateExpirationBasedDiscounts uses string-based multiplication (line 87).
    Suggestion: Replace hard-coded string "0.50" with new BigDecimal("0.50") to maintain BigDecimal precision consistency.

Summary

The solution is close to complete with correct logic but fails two critical tests due to date handling and missing cost calculations in shipping groups. Fixing these ensures full functionality.


Previous Feedback

🕒 Posted on 2025-10-05T20:52:40.364Z

Overall Feedback

Excellent work! Your WarehouseAnalyzer implementation is comprehensive and handles all the advanced requirements correctly. The code is well-structured, follows Java conventions, and demonstrates a strong understanding of the domain requirements. All the complex business logic, statistical calculations, and optimization algorithms are implemented accurately. LGTM!


Previous Feedback

🕒 Posted on 2025-10-05T20:52:02.231Z

Overall Feedback

Excellent work! Your WarehouseAnalyzer implementation is comprehensive and handles all the advanced requirements correctly. The code is well-structured, follows Java conventions, and demonstrates strong understanding of the domain logic. All tests should pass with this implementation.

Highlights:

  • Proper use of BigDecimal for monetary calculations with correct rounding
  • Efficient handling of date-based logic for expiration discounts
  • Clean implementation of statistical methods (outliers, weighted averages)
  • Correct use of polymorphism through interface checks (instanceof)
  • Well-documented methods that match the test expectations

LGTM! 🚀


kappsegla and others added 8 commits October 14, 2025 09:56
@DennSel DennSel deleted the branch feedback October 25, 2025 16:42
@DennSel DennSel closed this Oct 25, 2025
@DennSel DennSel reopened this Oct 25, 2025
@DennSel DennSel merged commit 50d2d7b into feedback Oct 25, 2025
0 of 2 checks passed
@DennSel DennSel mentioned this pull request Oct 26, 2025
@github-actions github-actions bot mentioned this pull request Oct 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants